var check_box ={

	//复选框表单全选，obj为全选按钮，form为全选表单所在的表单对象，默认为与obj在同一form
	//此函数已经升级，2012-09-19 13:42:37 见 html_obj.form.select_all_init
	all:function(obj, form){
		//找到所在的表单元素
		
		var form_obj = form == undefined ? $(obj).parents("form") : form;
		//得到复选框列表
		var box_list = form_obj.find("input[type=checkbox]");
		total = 0;
		checked = 0;

		box_list.each(function(k, v){
			var tmp = v.id.indexOf(obj.id+"_")

			if(tmp === 0){
				total ++;
				v.checked = obj.checked;
				if(v.checked){
					checked ++;
				}
			}
		});
		if(typeof select_all_handle == "function"){
			select_all_handle({
				"total_select": total,
				"checked": checked
			});
		}
	},

	/**
	* 绑定行点击选中时间
	* id列表table的i值
	*/
	row_click:function(id){
		$('#'+id+' tr:gt(0)').bind({
			click:function(event){
				if($(this).find('td:eq(0) :input').attr("checked")){
					$(this).find('td:eq(0) :input').attr("checked",false) ;
				}else{
					$(this).find('td:eq(0) :input').attr("checked",true) ;
				}
			}
		});
		//阻止时间冒泡
		$("#"+id).find("input,a").bind({
			"click":function(event){
				event.stopPropagation();
			}
		})
	}

}
